Skip to content

Records

Alt text

Data types

  • Data types allow programming languages to provide different classifications for items of data, so they can be used for different purposes.
DECLARE <identifier> : <data type>
DECLARE number : INTEGER
Data typeDescriptionPseudocodePython
booleanLogical values, True (1) and False (0)BOOLEANbool
charSingle alphanumerical characterCHARNot used
dateValue to represent a dateDATEclass datetime
integerWhole number, positive or negativeINTEGERint
realPositive or negative number with adecimal pointREALfloat
stringSequence of alphanumericalcharactersSTRINGstr

Data types

Filling the data types for pseoducode.

  1. Logical values, True (1) and False (0):
  2. Single alphanumerical character:
  3. Value to represent a date:
  4. Whole number, positive or negative:
  5. Positive or negative number with adecimal point:
  6. Sequence of alphanumerical characters:
[0/6]

Records

  • Records are composite data types formed by the inclusion of several related items that may be of different data types.
TYPE
<Typename>
    DECLARE <identifier> : <data type>
    DECLARE <identifier> : <data type>
    DECLARE <identifier> : <data type>
    ……
ENDTYPE
TYPE
TbookRecord
    DECLARE title : STRING
    DECLARE author : STRING
    DECLARE publisher : STRING
    DECLARE noPages : INTEGER
    DECLARE fiction : BOOLEAN
ENDTYPE
DECLARE Book : TbookRecord
Book.author ← "David"
Book.fiction ← FALSE

Data types

are composite data types formed by the inclusion of several related items that may be of different data types

[0/1]